package com.homer.commons.sscpprotocol.server;


import org.apache.mina.filter.codec.demux.DemuxingProtocolCodecFactory;

import com.homer.commons.sscpprotocol.server.impl.RequestDecoder;
import com.homer.commons.sscpprotocol.server.impl.ResponseEncoder;
import com.homer.commons.sscpprotocol.server.impl.SscpResponseImpl;

public class SscpProtocols extends DemuxingProtocolCodecFactory
{
  public SscpProtocols()
  {
    this(true);
  }

  public SscpProtocols(boolean bigEndian)
  {
    RequestDecoder decoder = new RequestDecoder(10);
    decoder.setBigEndian(bigEndian);
    addMessageDecoder(decoder);

    ResponseEncoder encoder = new ResponseEncoder(10);
    encoder.setBigEndian(bigEndian);    
    addMessageEncoder(SscpResponseImpl.class, encoder);
  }
}
